package com.xmut.mall.coupon.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmut.mall.coupon.entity.FullDiscountEntity;
import com.xmut.mall.coupon.searchparams.ManagerFullDiscountSearchParam;
import com.xmut.mall.coupon.searchparams.SellerFullDiscountSearchParam;
import com.xmut.mall.coupon.vo.ManagerFullDiscountPageVo;
import com.xmut.mall.coupon.vo.SellerFullDiscountPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

@Mapper
public interface FullDiscountDao extends BaseMapper<FullDiscountEntity> {

    /**
     * 获取卖家端的满减分页数据
     * @param initPage
     * @param param
     * @param date
     * @return
     */
    IPage<SellerFullDiscountPageVo> getSellerFullDiscountPage(Page<Object> initPage,@Param("param") SellerFullDiscountSearchParam param,@Param("now") Date date);

    /**
     * 获取商城管理端的满减活动分页数据
     * @param initPage
     * @param param
     * @param date
     * @return
     */
    IPage<ManagerFullDiscountPageVo> getManagerFullDiscountPage(Page<Object> initPage,@Param("param") ManagerFullDiscountSearchParam param,@Param("now") Date date);
}
